<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript" charset="utf-8">
	var loginDialog;
	$(function() {
		
		loginDialog = $('#loginDialog').show().dialog({
			closable : false,
			title : '登录',
			modal : true,
			buttons : [ {
				text : '注册',
				handler : function() {
					regDialog.dialog('open');
				}
			}, {
				text : '登录',
				handler : function() {
					var f = $('#loginTabs').find('form');
					f.submit();
				}
			} ],
			onOpen : function() {
				var t = $(this);
				window.setTimeout(function() {
					t.find('input[name=cname]').focus();
				}, 0);
			}
		});

		$('form input').bind('keyup', function(event) {/* 增加回车提交功能 */
			if (event.keyCode == '13') {
				$(this).submit();
			}
		});
	});
</script>
<div id="loginDialog" style="width:250px;height:210px;display: none;overflow: hidden;">
	<div id="loginTabs" data-options="fit:true,border:false">
		<div title="输入方式" style="overflow: hidden;">
			<div class="info">
				<div class="tip icon-tip"></div>
				<div>用户名和密码都是admin</div>
			</div>
			<div align="center">
				<form id="loginInputForm" method="post" action="${pageContext.request.contextPath}/loginAction!login.action" >
					<table>
						<tr>
							<th style="text-align: right;">登录名</th>
							<td><input name="cname" class="easyui-validatebox" data-options="required:true,missingMessage:'请填写登录名称'" value="" /></td>
						</tr>
						<tr>
							<th style="text-align: right;">密码</th>
							<td><input name="cpwd" type="password" class="easyui-validatebox" data-options="required:true,missingMessage:'请填写登录密码'" value="admin" style="width: 150px;" /></td>
						</tr>
					</table>
				</form>
			</div>
		</div>
	</div>
</div>